<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>微任务和宏任务测试</title>
</head>
<body>
    <script>
        setTimeout(()=>{
            console.log("3s后执行,先定义")
        },3000)
        setTimeout(()=>{
            console.log("1s后执行")
        },1000)
    </script>
</body>
</html>